import React, { Component, PropTypes } from 'react';
import { connect } from 'dva';
import { Link } from 'dva/router';
import './IndexPage.css';
import { Layout, Row, Col, Breadcrumb,Card,Checkbox } from 'antd';
import LeftNav from '../components/IndexPage/LeftNav';
import TopNav from '../components/IndexPage/TopNav';
import CustomBreadcrumb from '../components/IndexPage/Breadcrumb';
import ToggleButton from '../components/IndexPage/ToggleButton';
import TopSign from '../components/IndexPage/TopSign';

const { Header, Footer,Content, Sider } = Layout;
const CheckboxGroup = Checkbox.Group;

class App extends Component {
  constructor(props){
    super(props)
  }
  render(){
  	const plainOptions = [
		  { label: '企业信息', value: 'a',},
		  { label: '产品展示', value: 'b',},
		  { label: '资讯中心', value: 'c',},
		  { label: '权限管理', value: 'd',},
		  { label: '人事招聘', value: 'e',},
		  { label: '在线留言', value: 'f',},
		];
  	const abc=(
  		<Card title="欢迎来到安通官网后台" bordered={false}>
	      <p>管 理员 : ADMIN  下午好!</p>
	      <p>登陆时间: 2017/6/12</p>
	      <p>登 陆IP : 60.191.50.142</p>
	      <br/>
	      <CheckboxGroup options={plainOptions} defaultValue={['a','b','c','d','e','f']}/>
	    </Card>
  	)

    return(
      <Layout>
				<div>
					<a className="logo"></a>
					<ToggleButton/>
					<TopNav/>
					<TopSign/>
				</div>
				<Layout>
						<Sider collapsed={this.props.common.iscollapsed}>
							<LeftNav leftNavData={this.props.common.tabs}/>
						</Sider>
				    <Content style={{minHeight:906}}>
				    	<CustomBreadcrumb data={this.props.common.breadcrumb} />
					    
					    <div style={{padding:"0px 40px"}}>
					    	{this.props.children||abc}
					    </div>
				   		
				    </Content>
				</Layout>
				<Footer className="antong-footer">Antong ©2017 Created by Antong</Footer>
			</Layout>
    )
  }
}

function mapStateToProps({ common}) {
    return {common};
}
export default connect(mapStateToProps)(App) ;